package com.appkubes.mall.admin.application.goods.specific.service.impl;

import com.appkubes.mall.admin.application.goods.specific.service.GoodsSpecificService;
import com.appkubes.mall.core.entity.MallGoodsSpecific;
import com.appkubes.mall.core.service.impl.BaseMallGoodsSpecificServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsSpecificServiceImpl extends BaseMallGoodsSpecificServiceImpl implements GoodsSpecificService {

    @Override
    public MallGoodsSpecific getOne(String goodsKey) {
        MallGoodsSpecific query = new MallGoodsSpecific();
        query.setGoodsKey(goodsKey);
        List<MallGoodsSpecific> mallGoodsSpecificList = this.selectListByEntity(query);
        if (mallGoodsSpecificList.size() == 0) return null;
        return mallGoodsSpecificList.get(0);
    }


}
